
package org.movee.spring.data.hugegraph.annotation;

import org.movee.spring.data.hugegraph.schema.Multiplicity;
import org.springframework.data.annotation.Persistent;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Specifies the class as edge in graph, with one optional label(String).
 */
@Persistent
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Edge {
    /**
     * The label(gremlin reserved) of given Edge, can add Edge by label.
     * @return class name if not specify.
     */
    String label() default "Edge";

    String aliasLabel() default "";

    Multiplicity multiplicity() default Multiplicity.MULTI;

    Index[] indexes() default {};

    Unique[] uniqueConstraint() default {};
}
